package com.jintian.smart.kernel.security.mapper;

import com.jintian.smart.base.api.security.entity.HeartBeatRecordEntity;
import com.jintian.smart.base.api.security.form.HeartBeatRecordQueryForm;
import com.jintian.smart.base.api.security.view.HeartBeatRecordVO;
import com.jintian.smart.kernel.orm.mapper.IBaseExtMapper;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

import java.time.LocalDateTime;

/**
 * 心跳记录
 */
@Mapper
@SqlResource("security.HeartBeatRecord")
public interface HeartBeatRecordMapper extends IBaseExtMapper<HeartBeatRecordEntity> {
    /**
     * 更新心跳日志
     *
     * @param id
     * @param heartBeatTime
     */
    void updateHeartBeatTimeById(@Param("id") Long id, @Param("heartBeatTime") LocalDateTime heartBeatTime);

    /**
     * 查询心跳日志
     *
     * @param heartBeatRecordEntity
     * @return
     */
    HeartBeatRecordEntity query(HeartBeatRecordEntity heartBeatRecordEntity);

    /**
     * 分页查询
     *
     * @param heartBeatRecordQueryForm
     * @return
     */
    PageResult<HeartBeatRecordVO> pageQuery(@Param("queryForm") HeartBeatRecordQueryForm heartBeatRecordQueryForm);
}
